//
// Created by f12160c on 2018/7/26.
//

#include <iostream>
#include <vector>
#include<gtest/gtest.h>

#include "leetcode/leetcode.hpp"

using namespace std;

namespace {
    TEST(test_generateParenthesis, 1) {
        ListNode inputs[] = {1, 2, 3, 4};
        ListNode * pInput = &inputs[0];

        inputs[0].next = &inputs[1];
        inputs[1].next = &inputs[2];
        inputs[2].next = &inputs[3];

        pInput = Solution::swapPairs(pInput);

        ASSERT_EQ(pInput, &inputs[1]);
        pInput = pInput->next;
        ASSERT_EQ(pInput, &inputs[0]);
        pInput = pInput->next;
        ASSERT_EQ(pInput, &inputs[3]);
        pInput = pInput->next;
        ASSERT_EQ(pInput, &inputs[2]);

    }

}